"""mydjango URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url,include
from django.contrib import admin
from django.urls import path,re_path
from django.views.static import serve
from .views import *





urlpatterns = [
    #定义超链接路由
    re_path('^static/upload/(?P<path>.*)$',serve,{'document_root':'/static/upload/'}),
    path('addcourse/', AddCourse.as_view()),
    path('course_tags/', Course_Tags.as_view()),

    #路径添加接口
    path('add_img/', Add_img.as_view()),
    path('add_path/', Add_Path.as_view()),
    path('pathinfo/', PathInfo.as_view()),
    path('add_stage/', Add_Stage.as_view()),
    path('course_list/', Course_list.as_view()),
    path('course_online/', Course_online.as_view()),
    path('more_online/', More_online.as_view()),
    path('chapter_info/', Chapter_info.as_view()),
    # 查找课程
    path('findcourse/', FindCourse.as_view()),
    # 展示课程类别
    path('allcoursetype/', AllCourseType.as_view()),
    # 后台接口标签(增删改查)
    path('addtags/', AddTags.as_view()),
    path('deletetags/', DeleteTags.as_view()),
    path('updatetags/', UpdateTags.as_view()),
    path('alltags/', AllTags.as_view()),
    path('update_type/', Update_type.as_view()),

        #为前端获取tags信息
    path('gettags/',GetTags.as_view()),
    path('addcourse_one/',AddCourse_one.as_view()),
    path('get_course_chapter/',Course_list_chapter.as_view()),
    path('addchapter_one/',AddChapter_one.as_view()),
    path('hotpath/',HotPath.as_view()),




]
